package com.suray.wcs.service.pojo.rgv.move.speed;

/**
 * 子车按速度行驶状态
 */
public enum NormalActionStatus {
    INVALID(-1, "无效"),
    STANDY(0, "就绪"),
    ACTION(1, "开始"),
    STOP_ACTION(2, "停止"),
    ;

    private int value;
    private String des;

    NormalActionStatus(int value, String des) {
        this.value = value;
        this.des = des;
    }

    public int getValue() {
        return value;
    }

    public static NormalActionStatus parseStatus(int value) {
        for (NormalActionStatus status : NormalActionStatus.values()) {
            if (status.value == value) {
                return status;
            }
        }

        return INVALID;
    }

    @Override
    public String toString() {
        return des;
    }
}
